package com.situ.mall.common.vo;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.situ.mall.common.util.Constants;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@JsonInclude(JsonInclude.Include.NON_NULL)
public class IndexCategoryVO implements Serializable {

    private Integer id;

    private String name;

    private String imgPath;

    private List<IndexCategoryVO> children;

    public String getImgPathShow() {
        if (this.imgPath != null) {
            return Constants.filePath + this.imgPath;
        }
        return null;
    }

}
